﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SEAM.Exception.Formatter
{
    public class TextExceptionFormatter : ExceptionFormatterBase
    {
        protected override string GetSection(string sectionName, IDictionary sectionInfo)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine(sectionName);
            foreach(object key in sectionInfo.Keys)
                sb.AppendFormat("{0}:  {1}\r\n", key, sectionInfo[key]);
            return sb.ToString();
        }

        protected override string GetHeader()
        {
            return "-------------------------------------------------------------" + Environment.NewLine;
        }

        protected override string GetFooter()
        {
            return "-------------------------------------------------------------" + Environment.NewLine;
        }

        protected override string GetSectionSeparator()
        {
            return Environment.NewLine + Environment.NewLine;
        }
    }
}
